package com.supostacks.domain.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.supostacks.domain.repository.IFileManagementRepository;
import com.supostacks.domain.service.IFileManagementService;
import com.supostacks.domain.vo.FileManagementVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class FileManagementServiceImpl implements IFileManagementService {
    @Resource
    IFileManagementRepository fileManagementRepository;

    @Override
    public String insert(FileManagementVo fileManagementVo) {
        return fileManagementRepository.insert(fileManagementVo);
    }

    @Override
    public void deleteById(String id) {
        fileManagementRepository.deleteById(id);
    }

    @Override
    public String updateById(FileManagementVo fileManagementVo) {
        return fileManagementRepository.updateById(fileManagementVo);
    }

    @Override
    public FileManagementVo selectById(String id) {
        return fileManagementRepository.selectById(id);
    }

    @Override
    public List<FileManagementVo> selectList(JSONObject option) {
        return fileManagementRepository.selectList(option);
    }

    @Override
    public JSONObject selectByPage(JSONObject param, int pageNo, int pageSize) {
        return fileManagementRepository.selectByPage(param, pageNo, pageSize);
    }
}
